﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Arcana.Contract.Tests.Argument.Has
{
    [TestClass]
    public class AnyAttributeTest
    {
        [Arcana.Contract.Argument.Has.Any("param", new object[] {1, 2, 3})]
        public static void Target_1(int[] param)
        {
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        [ExpectedException(typeof(ArgumentException))]
        public void ShouldThrowException()
        {
            Target_1(new int[] { 5, 6, 7 });
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass_1()
        {
            Target_1(new int[] { 7, 8, 1, 4, 5 });
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass_2()
        {
            Target_1(new int[] { 7, 8, 3, 4, 5 });
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass_3()
        {
            Target_1(new int[] { 7, 8, 2, 4, 5 });
        }

        [TestMethod]
        [Owner("arcane_master")]
        [WorkItem(48)]
        public void ShouldPass_4()
        {
            Target_1(new int[] { 7, 8, 1, 4, 5, 2, 4, 5, 3 });
        }
    }
}
